home *** CD-ROM | disk | FTP | other *** search
/ Graphics Plus / Graphics Plus.iso / libs / sphigs / sph_srgp.lha / srgp / examples / testtimestamp.c < prev    next >
Encoding:
C/C++ Source or Header  |  1992-01-09  |  661 b   |  29 lines

  1. #include "srgp.h"
  2. #include <stdio.h>
  3.  
  4. main()
  5. {
  6.    deluxe_locator_measure locmeasure;
  7.    int whichdev;
  8.    char buff[50];
  9.  
  10.  
  11.    SRGP_begin ("Testing timestamps!", 400,400, 1, FALSE);
  12.  
  13.    SRGP_setLocatorButtonMask(LEFT_BUTTON_MASK);
  14.    SRGP_setInputMode(LOCATOR, EVENT);   
  15.  
  16.    while (1) {
  17.       SRGP_waitEvent(INDEFINITE);
  18.       SRGP_getDeluxeLocator(&locmeasure);
  19.       if (locmeasure.modifier_chord[SHIFT] == DOWN)
  20.      exit(0);
  21.       sprintf (buff, "%d:%2d", 
  22.            locmeasure.timestamp.seconds, locmeasure.timestamp.ticks);
  23.       SRGP_text (locmeasure.position, buff);
  24.       /* Swallow the UP event. */
  25.       while(LOCATOR!=SRGP_waitEvent(INDEFINITE));
  26.    }
  27. }
  28.  
  29.